home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt3sp4.arc / VIEWPMPT.PAS < prev    next >
Pascal/Delphi Source File  |  1985-06-30  |  3KB  |  79 lines

  1. (*----------------------------------------------------------------------*)
  2. (*           View_Prompt --- prompt for end-of-screen                   *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE View_Prompt( VAR View_Done : BOOLEAN; VAR View_Count : INTEGER );
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*     Procedure:  View_Prompt                                          *)
  10. (*                                                                      *)
  11. (*     Purpose:    Issues end-of-screen prompt for view routines        *)
  12. (*                                                                      *)
  13. (*     Calling Sequence:                                                *)
  14. (*                                                                      *)
  15. (*        View_Prompt( VAR View_Done  : BOOLEAN;                        *)
  16. (*                     VAR View_Count : INTEGER );                      *)
  17. (*                                                                      *)
  18. (*           View_Done  --- TRUE if Stop option selected here           *)
  19. (*           View_Count --- Count of lines per panel.  May be changed   *)
  20. (*                          here if C option selected.                  *)
  21. (*                                                                      *)
  22. (*     Calls:   RvsVideoOn                                              *)
  23. (*              RvsVideoOff                                             *)
  24. (*                                                                      *)
  25. (*     Called by:                                                       *)
  26. (*                                                                      *)
  27. (*        View_A_File                                                   *)
  28. (*        View_A_Directory                                              *)
  29. (*        Get_Area_Code                                                 *)
  30. (*                                                                      *)
  31. (*----------------------------------------------------------------------*)
  32.  
  33. BEGIN (* View_Prompt *)
  34.  
  35.    View_Count := 1;
  36.    View_Y     := WhereY;
  37.  
  38.    REPEAT
  39.  
  40.       GoToXY( 1 , View_Y );
  41.       ClrEol;
  42.  
  43.       RvsVideoOn( Menu_Text_Color , BackGround_Color );
  44.  
  45.       WRITE('Enter CR to continue, S to stop, ',
  46.             'C to continue non-stop: ');
  47.  
  48.       RvsVideoOff( Menu_Text_Color , BackGround_Color );
  49.  
  50.       READ( View_Char );
  51.  
  52.       IF LENGTH( View_Char ) > 0  Then
  53.          IF View_Char[1] <> CHR(ESC) Then
  54.             BEGIN
  55.                View_Char := UPCASE( View_Char[1] );
  56.             END
  57.          ELSE
  58.             BEGIN
  59.                READ( View_Char );
  60.                View_Char := UPCASE( View_Char[1] );
  61.             END
  62.       ELSE
  63.          View_Char := ' ';
  64.  
  65.    UNTIL( View_Char[1] IN ['S', 'C', ' '] );
  66.  
  67.    CASE View_Char[1] Of
  68.       'C':  View_Count := -MaxInt;
  69.       'S':  View_Done  := TRUE;
  70.       ELSE
  71.             ;
  72.    END (* CASE *);
  73.  
  74.    GoToXY( 1 , View_Y );
  75.    ClrEol;
  76.    GoToXY( 1 , View_Y );
  77.  
  78. END  (* View_Prompt *);
  79.